package com.rafaelGarcia.eLibreria.presentacion;

import com.vaadin.server.VaadinRequest;
import com.vaadin.ui.AbsoluteLayout;
import com.vaadin.ui.TabSheet;
import com.vaadin.ui.UI;

/**
 * The Application's "main" class
 */
@SuppressWarnings("serial")
public class Main extends UI
{

	AbsoluteLayout mainLayout = new AbsoluteLayout();
	TabSheet tabSheet_main = new TabSheet();
	
    @Override
    protected void init(VaadinRequest request) {

		mainLayout.setImmediate(false);
		mainLayout.setWidth("100%");
		mainLayout.setHeight("100%");
		
		setWidth("100.0%");
		setHeight("100.0%");
    	
		tabSheet_main = buildTabSheet_Main();
		mainLayout.addComponent(tabSheet_main, "top:0.0px;");
    	
        setContent(mainLayout); 
    }

	private TabSheet buildTabSheet_Main() {
		tabSheet_main = new TabSheet();
		tabSheet_main.setImmediate(true);
		tabSheet_main.setWidth("100.0%");
		tabSheet_main.setHeight("100.0%");
		
		// Vista_Libro
		tabSheet_main.addTab(new Vista_Libro(), "Libro", null);
		tabSheet_main.addTab(new Vista_Editorial(), "Editorial", null);
		tabSheet_main.addTab(new Vista_Autor(), "Autor", null);
		tabSheet_main.addTab(new Vista_Estilo(), "Estilo", null);
		tabSheet_main.addTab(new Vista_Localizacion(), "Localizacion", null);
		tabSheet_main.addTab(new Vista_RIVA(), "Regimen IVA", null);
		
		return tabSheet_main;
	}

}
